package com.dfbz.demo04_objects;

import java.util.Objects;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01 {
    public static void main(String[] args) {

        Person p1 = new Person(20);
        Person p2 = new Person(20);

        boolean flag = Objects.equals(p1, p2);

        System.out.println(flag);
    }
}

class Person{

    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Person() {
    }

    public Person(int age) {
        this.age = age;
    }
}
